#include "generator.h"

generator::generator() {
	srand( time(NULL) );
}

string generator::generate_number(long& num_digits) {
	ostringstream number;
	
	for ( int i = 0; i < num_digits; i++ ) {
		//0-9 if not the first digit
		if ( i > 0 ) {
			number << (rand() % 10);
		}
		//1-9 if the first digit
		else {
			number << (rand() % 9 + 1);
		}
	}

	return number.str();
}

